typedef HRESULT (WINAPI *TD3DXCreateTextureFromFileInMemory)(
  _In_   LPDIRECT3DDEVICE9 pDevice,
  _In_   LPCVOID pSrcData,
  _In_   UINT SrcDataSize,
  _Out_  LPDIRECT3DTEXTURE9 *ppTexture
);

TD3DXCreateTextureFromFileInMemory OldD3DXCreateTextureFromFileInMemory;

DllExport HRESULT cc D3DXCreateTextureFromFileInMemory(
  _In_   LPDIRECT3DDEVICE9 pDevice,
  _In_   LPCVOID pSrcData,
  _In_   UINT SrcDataSize,
  _Out_  LPDIRECT3DTEXTURE9 *ppTexture
)
{
	Log("CTFFInMemory", 13);
	//Beep(1000, 100);
	
	return OldD3DXCreateTextureFromFileInMemory (pDevice, pSrcData, SrcDataSize, ppTexture);
}
